#include<bits/stdc++.h>
using namespace std;
int main(){
	freopen("num.in" , "r" , stdin);
	freopen("num.out" , "w" , stdout);
	const int N = 1010;
	int a[N] , n , sum = 0 , ans = 0;
	cin >> n;
	for(int i = 1 ; i <= n ; i++) cin >> a[i];
	for(int i = 1 ; i <= n ; i++)
	{
		int cnt1 = 0 , cnt2 = 0;
		for(int j = 1 ; j < i ; j++){
			if(a[j] > a[i]) cnt1++;
		}
		for(int j = i + 1 ; j <= n ; j++){
			if(a[j] > a[i]) cnt2++;
		}
		if(cnt1 == cnt2) ans++;
	}
	cout << ans << endl;
	return 0;
}